package com.yangkunhong.constant;

/**
 * @Author yangkunhong
 * @Date 2023/6/8 8:47
 * @Version 1.0
 */
public enum ErrMsg {
    /**
     *所有的错误消息
     */
    OK(200,"请求成功"),
    LOGIN_OK(200,"登陆成功"),
    PASSWORD_OK(200,"密码修改成功"),
    UPLOAD_OK(200,"上传成功"),
    NO_DATA(204,"没有数据"),
    UPLOAD_ERR(400,"上传失败"),
    ERROR(4000,"请操作失败"),
    USERNAME_ERR(3001,"输入的用户名有误"),
    PASSWORD_ERR(3002,"请输入密码"),
    RE_PASSWORD_ERR(3003,"请再次输入密码"),

    PASSWORD_MATCH_ERR(3004,"两次输入密码不一致"),
    USERNAME_EXISTS_ERR(3005,"用户名已被占用"),
    REGISTER_ERR(3006,"注册失败，请联系管理员"),
    REGISTER_OK(3007,"注册成功"),
    CAPTCHA_ERR(3008,"验证码错误"),
    USERNAME_NO_EXISTS_ERR(3009,"用户名不存在"),
    PASSWORD_NO(3010,"密码错误"),
    NEW_PASSWORD_ERR(3011,"请输入新密码"),
    OLD_PASSWORD_ERR(3012,"旧密码错误"),
    NO_LOGIN(401,"请重新登陆"),
    ACCOUNT_NO(3005,"账号或验证码错误"),
    PRODUCT_NO(3015,"商品错误"),
    ACCOUNT_FORBIDDEN(3006,"账号被禁用"),
    ACCOUNT_LOCK(3007,"账号被锁定"),
    LOGIN_SUCCESS(200,"登录成功"),
    ORDER_SUCCESS(200,"下单成功"),
    REGISTER_SUCCESS(200,"注册成功"),
    INTO_SUCCESS(200,"入库成功"),
    USERNAME_NO(3009,"用户名不可用"),
    PRODUCT_FIAL(3016,"商品不可用"),
    PASSWORD_NOSAME(3010,"密码不一致"),
    REPASSWORD_ERR(3011,"请确认密码"),
    DELETE_ERR(3012,"删除失败"),
    DELETE_SUCCESS(200,"删除成功"),
    PRODUCT_ERR(3013,"商品错误"),
    PRODUCTNUM_ERR(3014,"商品暂无");
    //......其他错误


    private int code;

    private String message;

    ErrMsg(int code, String message) {
        this.code = code;
        this.message=message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
